﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EzDesk.Core.Model;
using System.ServiceModel;

namespace EzDesk.Core
{
    [ServiceContract]
    public interface ICoreAppService
    {
        [OperationContract]
        UserProfile GetUserProfileById(Guid userId);

        [OperationContract]
        IList<SimpleUser> GetSimpleUserInfos(string memberstring);

        [OperationContract]
        SimpleUser GetSimpleUserById(Guid userId);

        [OperationContract]
        IList<Dept> GetAllDepts();

        [OperationContract]
        IList<SimpleUser> GetAllUsersByMemberString(string memberString);
        [OperationContract]
        IDictionary<Guid, string> GetChildrenByMemberString(string memberString);

        [OperationContract]
        IList<Group> GetAllSystemGroups();

        [OperationContract]
        Group GetGroupById(Guid groupId);
        [OperationContract]
        IList<Group> GetGroups(string groupIdStrs);
        [OperationContract]
        Group GetGroupMemberstring(string memberstring);

        [OperationContract]
        Guid SendFeed(string feedTypeStr, Guid templateId, Guid? senderId, string feedData, string memberString, bool sendToSelf);
        [OperationContract(Name="SendFeedByName")]
        Guid SendFeed(string feedTypeStr, string templateName, Guid? senderId, string feedData, string memberString, DateTime expireOn, bool sendToSelf);
        [OperationContract]
        void UpdatePersonalFeedData(Guid feedId, string memberstring, string feedDataEx);
        
        [OperationContract]
        void UpdateFeedData(Guid updateFeedId, string newFeedData);
        [OperationContract]
        void UpdateFeedsData(string updateFeeds, string updateFeedData);

        [OperationContract]
        void SetFeedIsAvailable(Guid feedId, string memberString, bool isAvailable);
        [OperationContract]
        void SetFeedsIsAvailable(string feedIdStrs, string memberString, bool isAvailable);
    }
}
